import React from 'react';
import ReactDOM from 'react-dom';
import './assets/bootstrap.min.css'
import './assets/bootstrap-theme.min.css'
import './index.css';
// import App from './App';
import * as serviceWorker from './serviceWorker';
import moment from 'moment'
import {LocaleProvider, message} from "antd";
import zh_CN from 'antd/lib/locale-provider/zh_CN'
import {Provider} from 'mobx-react'
import router from "./router";
import {HashRouter as Router} from "react-router-dom";
import httpUtil from './utils/HttpUtils'
import store from './store'


moment.locale('zh-cn');
// require('assets/bootstrap.min.css');
// require('assets/bootstrap-theme.min.css');

const CONTAINER = document.getElementById('root');
CONTAINER.style.height = '100%';

window.$message = message;
window.$http = httpUtil;


ReactDOM.render(
    <Provider store={store}>
        <LocaleProvider locale={zh_CN}>
            <Router store={store}>{router}</Router>
        </LocaleProvider>
    </Provider>
    , CONTAINER);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();